<template>
    <div>
        <div id="box">
            <input type="text" placeholder="请输入你的任务名称,按回车键确认" v-model="name" @keyup.enter="ck" />
        </div>
    </div>
</template>
  
<script>
import bus from "../JS/bus";
export default {
    data() {
        return {
            name: "",
        };
    },
    methods: {
        ck() {
            if (this.name != "") {
                bus.$emit("send", this.name);
                bus.$emit("send6", false);
            }
        },
    },
};
</script>
  
<style lang="less" scoped>
#box {
    outline: @outline;
    margin: auto;
    text-align: center;

    input {
        width: 480px;
        height: 20px;
    }
}
</style>